package Array.arrayone;
import java.util.Scanner;
public class String1 {
    public static void main(String[] args){
        String s="张三";
        String s1="123456";
        Scanner sc=new Scanner(System.in);
        for (int i=1;i<=3;i++){
            System.out.println("请输入您的用户名");
         String name=sc.next();
            System.out.println("请输入您的密码");
         String mima=sc.next();
         if (name.equals(s)&&mima.equals(s1)){
             System.out.println("登入成功");
             break;
         } else{
             if (i==3){
                 System.out.println("您的机会用完请明天再来");
             } else{
                 System.out.println("您还剩"+(3-i)+"次机会");
             }
         }
        }
    }
}
